home *** CD-ROM | disk | FTP | other *** search
/ What CD? 12 / What PC June 1997.iso / multi / cyber / cyber95 / _setup.1 / WEB2.POP < prev    next >
Encoding:
Text File  |  1996-09-04  |  1.8 KB  |  77 lines

  1. // web2.pop
  2. // describes a form based on William Latham's "Web Forms"
  3. // extends upon web.pop by adding rotational commands to horn forms
  4. // extends upon web1.pop by adding vector-egg-scaling
  5.  
  6. population 0
  7. dimensions = 1
  8. colour_model RGB
  9. render_quality flat
  10.  
  11. genome 0 {
  12.  
  13.     // top level structure iterates in a circle, creating outward pointing spokes
  14.     setScalarMem( 0, 5 : 3 : 10 ),  // mem[0] = #spokes
  15.     branchFor(
  16.         getScalarMem(0),
  17.         1,        // mem[1] = current spoke [ 0 ... #spokes-1]
  18.  
  19.         // inter-spoke code - rotates in a circle
  20.         *join(
  21.             swivelLeft( div(dtor(360), getScalarMem(0)) ),
  22.             bankLeft( dtor(5:0:60) )
  23.         ),
  24.  
  25.         // spoke code - creates a horn form jutting out at right angles to
  26.         // main circle and then branches smaller sub-horns at right angles
  27.         join(
  28.             swivelRight( dtor(90) ),
  29.  
  30.             // major horn form
  31.             *scope(
  32.                 eggScale( 1 : .5 : 1.5 ),
  33.                 repeat(
  34.                     3 : 2 : 20,
  35.                     join(
  36.                         forward( .5 : 0.01 : 0.6 ),
  37.                         moveHue( .1 : -.2 : .2 ),
  38.                         bankLeft( dtor(5:0:30) ),
  39.                         eggVectorScale( <1,1,1> : <.5,.5,.5> : <1.5,1.5,1.5> ),
  40.                         lay
  41.                     )
  42.                 )
  43.             ), // end major horn form
  44.  
  45.             // minor branches
  46.             eggScale( 1 : .5 : 1.5 ),
  47.             *repeat(
  48.                 3 : 2 : 20,
  49.  
  50.                 join(
  51.                     forward( .5 : 0.01 : 0.6 ),
  52.                     bankLeft( dtor(5:0:30) ),
  53.  
  54.                     // minor horn-form
  55.                     *scope(
  56.                         swivelRight( dtor(90) ),
  57.                         scale( .5 : 0.1 : 1.3 ),
  58.                         repeat(
  59.                             8 : 2 : 40,
  60.                             join( 
  61.                                 forward( .5 : 0.05 : 0.6 ),
  62.                                 moveHue( .1 : -.2 : .2 ),
  63.                                 bankLeft( dtor(5:0:30) ),
  64.                                 eggVectorScale( <1,1,1> : <.5,.5,.5> : <1.5,1.5,1.5> ),
  65.                                 lay
  66.                             )
  67.                         )
  68.                     ) // end minor horn form
  69.                 )
  70.             ) // end minor branches
  71.     
  72.         )  // end spoke code
  73.     ) // end web 'branchFor'
  74. }
  75.  
  76. // eof : web2.pop
  77.